/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package frc2856.robot;

import edu.wpi.first.wpilibj.*;

/**
 *
 * @author Dustin
 */
public class Camera {
    //Public Member Variables
    Servo servo;
    Relay switchy;
    boolean ringOn;
    
    public Camera(Servo s, Relay r){
        servo = s;
        switchy = r;
        ringOn = false;
    }
    
    public void setAngle(double angle){
        servo.set(Math.min(1, Math.max(0, angle)));
    }
    
    public void incrementAngle(double degrees){
        servo.set(Math.min(1, Math.max(0, servo.get()+degrees)));
    }
    
    public void ringOn(boolean b){
        ringOn = b;
        if(b){
            switchy.set(Relay.Value.kOn);
        }
        else{
            switchy.set(Relay.Value.kOff);
        }
    }
}
